package google.sites.view.menus.misc;

import com.google.gdata.util.ServiceException;
import dev.tools.view.dialogs.ListDialog;
import google.sites.model.Model;
import google.sites.view.View;

import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * User: Nuno
 * Date: 01-10-2013
 * Time: 16:32
 */
public class MiscListRevisionsDialog extends ListDialog {
    private String contentEntryId;

    public MiscListRevisionsDialog() {
        super(View.INSTANCE);
    }

    @Override
    public void setVisible(boolean b) {
        super.setVisible(b);
        try {
            setStrings(Model.INSTANCE.getRevisionFeed(contentEntryId));
        } catch (IOException | ServiceException e) {
            View.showError(e);
        }
    }
}
